package com.qizhou.compiler

import com.qizhou.compiler.aptUtils.logger.Logger
import com.squareup.kotlinpoet.ClassName
import java.io.File


const val spUrlKey:String = "urlKey"
val StringClassName = ClassName("kotlin", "String")
const val ObservableSimpleName = "Observable"
const val CommonParseModelSimpleName = "CommonParseModel"
val CommonListResultSimpleName = "CommonListResult"
val BaseReposityClasType = ClassName("com.pince.frame.mvvm.architecture","BaseReposity")
val CommonParseModel = ClassName("com.qizhou.base.been.common","CommonParseModel")
val CommonListResult = ClassName("com.qizhou.base.been.common","CommonListResult")
val ObservableClassType = ClassName("io.reactivex","Observable")
val ListClassType = ClassName("kotlin.collections","List")
val SimpleDataSourceClassType = ClassName("com.pince.datasource","SimpleDataSource")


val FilterHttpCodeClassType =  ClassName("com.qizhou.base.ext","filterHttpCode")
val OnlyFilterHttpCodeClassType =  ClassName("com.qizhou.base.ext","onlyFilterHttpCode")
val ListFilterHttpCodeClassType =  ClassName("com.qizhou.base.ext","listFilterHttpCode")
val ListOnlyFilterHttpCodeClassType =  ClassName("com.qizhou.base.ext","listOnlyFilterHttpCode")


val SpCacheHttpClassName = ClassName("com.pince.datasource.cache","SpCacheProvide")
val FetchStrategyClassName = ClassName("com.pince.datasource","FetchStrategy")


fun String.transformFromKaptPathToAptPath(): String {
    Logger.warn("transformFromKaptPathToAptPath  "+this)
    return File(this).parentFile.parentFile.parentFile.parentFile.parentFile.path + "/src/main/java"
}

